#include "ShortLayout.h"
#include <QToolButton>
#include <QLabel>

ShortLayout::ShortLayout()
{

}



ShortLayout::ShortLayout(
    QVBoxLayout* widget)
{
    widget->addLayout(this);
    widget->addSpacing(5);
    this->add_sub_widget();

    QLabel* lab = new QLabel(tr("11"));
    lab->setMaximumWidth(300);
    lab->setMaximumHeight(1);
    lab->setFrameShape (QFrame::Box);
    lab->setStyleSheet("border-width: 1px;border-style: solid;border-color: rgb(96, 96, 96);");
    widget->addWidget(lab);
}



ShortLayout::~ShortLayout()
{

}



void
ShortLayout::add_sub_widget()
{
    QToolButton* short_properties = new QToolButton;

    //file_new->setIconSize(QSize(50,50));
    short_properties->setIcon(QIcon(":/resource/image/properties.png"));
    short_properties->setToolTip(tr ("属性"));
    this->addWidget(short_properties);


    QToolButton* short_delete = new QToolButton;
    short_delete->setIcon(QIcon(":/resource/image/delete.png"));
    short_delete->setToolTip(tr ("删除"));
    this->addWidget(short_delete);


    QToolButton* short_find = new QToolButton;
    short_find->setIcon(QIcon(":/resource/image/find.png"));
    short_find->setToolTip(tr ("查找"));
    this->addWidget(short_find);


    QToolButton* short_copy = new QToolButton;
    short_copy->setIcon(QIcon(":/resource/image/copy.png"));
    short_copy->setToolTip(tr ("拷贝"));
    this->addWidget(short_copy);


    QToolButton* short_paste = new QToolButton;
    short_paste->setIcon(QIcon(":/resource/image/paste.png"));
    short_paste->setToolTip(tr ("复制"));
    this->addWidget(short_paste);

    this->addStretch();


}
